package EveryDayPractice;

import java.util.Date;
import java.util.Scanner;

public class Practice14 {
     public static void main(String[] args) {
               Scanner sc = new Scanner(System.in);
          System.out.println("请输入年");
          int year=sc.nextInt();
          System.out.println("请输入月");
          int month=sc.nextInt();
          System.out.println("请输入日");
          int day=sc.nextInt();
          sum_date(year,month,day);
     }
     public static void sum_date(int year,int month,int day){

          int sum=0;
          if(year%4==0&&year%100!=0||year%400==0){
               for(int i=1;i<month;i++){
                    if(i==2)
                    {
                         sum+=29;
                    }
                    else if(i==1||i==3||i==5||i==7||i==8||i==10||i==12)
                    {
                         sum+=31;
                    }
                    else
                    {
                         sum+=30;
                    }
               }
          }
          else
          {  for(int i=1;i<month;i++){
               if(i==2)
               {
                    sum+=28;
               }
               else if(i==1||i==3||i==5||i==7||i==8||i==10||i==12)
               {
                    sum+=31;
               }
               else
               {
                    sum+=30;
               }
          }

          }
          sum=sum+day;
          System.out.println(sum+"天");
     }
}
